package com.iplant.ams.service;

import com.iplant.ams.service.po.dms.DMSDeviceLedger;
import com.iplant.ams.service.po.dms.maintenance.*;
import com.iplant.base.po.Pagination;
import com.iplant.base.po.ServiceResult;
import com.iplant.base.po.excel.ExcelData;
import com.iplant.basic.service.po.bms.BMSEmployee;

import java.util.List;
import java.util.Map;

public interface DRMService {

    //region 设备构型
    ServiceResult<Integer> DMS_UpdateConfiguration(BMSEmployee wLoginUser, DMSConfiguration wDMSConfiguration);
    //endregion

    ServiceResult<List<DMSConfiguration>> DMS_SelectDeviceConfigurationList(BMSEmployee wLoginUser, int wDeviceID);

    //region 设备维保/点检
    ServiceResult<List<DMSMaintenanceItem>> DMS_QueryMaintenanceItemByRule(BMSEmployee wLoginUser, int wRuleID,
                                                                           Pagination wPagination);

    ServiceResult<List<DMSMaintenanceItemTask>> DMS_QueryMaintenanceItemTaskByDevice(BMSEmployee wLoginUser,
                                                                                     int wDeviceID,
                                                                                     int wConfigurationID,
                                                                                     String wName, int wStatus,
                                                                                     int wType, int wMaintenanceLevel, Pagination wPagination);

    ServiceResult<Integer> DMS_TriggerTaskMaintenanceItem(BMSEmployee wLoginUser,
                                                          List<DMSMaintenanceItemTask> wDMSMaintenanceItemTaskList,
                                                          int wType);

    ServiceResult<Integer> DMS_SubmitMaintenanceItemTask(BMSEmployee wLoginUser,
                                                         DMSMaintenanceItemTask wDMSMaintenanceItemTask, int wType);

    ServiceResult<List<DMSMaintenanceRule>> DMS_QueryMaintenanceRuleByMaintenanceItemID(BMSEmployee wLoginUser,
                                                                                        int wMaintenanceItemID,
                                                                                        int wType,
                                                                                        String wDescription,
                                                                                        int wActive,
                                                                                        Pagination wPagination);

    ServiceResult<List<DMSMaintenancePlan>> DMS_QueryDMSMaintenancePlanList(BMSEmployee wLoginUser, String wCode,
                                                                            String wName, int wStatus, int wFactoryID
            , int wWorkShopID, int wWorkAreaID, int wType, Pagination wPagination);

    ServiceResult<Integer> DMS_UpdateMaintenanceRule(BMSEmployee wLoginUser, DMSMaintenanceRule wDMSMaintenanceRule);

    ServiceResult<List<DMSMaintenanceStep>> DMS_QueryMaintenanceStepAll(BMSEmployee wLoginUser,
                                                                        Map<String, Object> wParams,
                                                                        Pagination wPagination);

    ServiceResult<DMSMaintenanceStep> DMS_QueryMaintenanceStepInfo(BMSEmployee wLoginUser, Map<String, Object> wParams);

    ServiceResult<Integer> DMS_UpdateMaintenanceItem(BMSEmployee wLoginUser, DMSMaintenanceItem wDMSMaintenanceItem);

    ServiceResult<Integer> DMS_AutoTriggerTask(BMSEmployee wLoginUser);

    ServiceResult<List<DMSConfiguration>> DMS_CopyDeviceConfigurationList(BMSEmployee wLoginUser, DMSDeviceLedger wLedger, DMSDeviceLedger wTargetLedger);

    ServiceResult<Integer> DMS_ResetTask(BMSEmployee wLoginUser, int wDeviceID, int wMaintenanceLevel);

    ServiceResult<Integer> DRM_ImportMaintenanceItem(BMSEmployee wLoginUser, ExcelData wExcelData);

    ServiceResult<String> DRM_ExportMaintenanceItem(BMSEmployee wLoginUser, int wConfigurationID, int wMaintenanceLevel, int wActive);

    ServiceResult<Integer> DRM_InitConfiguration(BMSEmployee wLoginUser);

    ServiceResult<Integer> DRM_SynchronizDeviceConfigurationName(BMSEmployee wLoginUser, DMSDeviceLedger wDMSDeviceLedger);
    //endregion



}
